package com.ztt.mapper;

import com.ztt.pojo.entity.zttUser;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    //根据用户名进行查询
    @Select("select * from users where Name = #{userName}")
    zttUser findByUserName(String userName);

    @Insert("insert into users(Name , Password , Admin) values (#{name} , #{password} , #{admin})")
    void insertUser(zttUser user);

}
